﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="hrSaveValues.aspx.cs" Inherits="ZX.WebApp.EHR.hrSaveValues" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>考勤阀值设置</title>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
     <script type="text/javascript">
    // <![CDATA[
         $(document).ready(function () {
             parent.document.getElementById("dialog1_h").innerHTML = "考勤阀值设置";
         });

         //数据保存
         function Save() {
             var AllowLateTimes = $("#AllowLateTimes").val();
             var AllowAdvancedTimes = $("#AllowAdvancedTimes").val();
             var AllowLateCounts = $("#AllowLateCounts").val();
             var AbsenceTimes = $("#AbsenceTimes").val();

             //提交数据
             YAHOO.util.Connect.asyncRequest('POST', "hrSaveValues.aspx?flag=save&AllowLateTimes=" + AllowLateTimes + "&AllowAdvancedTimes=" + AllowAdvancedTimes + "&AllowLateCounts=" + AllowLateCounts + "&AbsenceTimes=" + AbsenceTimes, {
                 success: function (res) {
                     try {
                         var str = res.responseText;
                         if (str.substring(0, 1) == "1") {
                             alert("数据保存成功!");
                             parent.closeWin();
                             parent.ReLoadData();
                         }
                         else {
                             alert("数据保存失败,请检查");
                         }
                     }
                     catch (e) {
                     }
                     finally {
                     }
                 },
                 failure: function (error) {
                     alert("数据错误：" + error.statusText);
                 }
             }, null);
         }
    // ]]> 
     </script>
</head>
<body>
    <form id="form1" runat="server">
    <table style="font-family: 宋体, Arial, Helvetica, sans-serif; font-size: small">
      <tr>
        <td align="right">允许迟到分钟数：</td>
        <td>
          <input type="text" id="AllowLateTimes" name="AllowLateTimes" value="" runat="server" />
        </td>
      </tr>
      <tr>
        <td align="right">允许早退分钟数：</td>
        <td>
          <input type="text" id="AllowAdvancedTimes" name="AllowAdvancedTimes" value="" runat="server" />
        </td>
      </tr>
      <tr>
        <td align="right">允许迟到次数：</td>
        <td>
          <input type="text" id="AllowLateCounts" name="AllowLateCounts" value="" runat="server" />
        </td>
      </tr>
      <tr>
        <td align="right">允许缺勤分钟数：</td>
        <td>
          <input type="text" id="AbsenceTimes" name="AbsenceTimes" value="" runat="server" />
        </td>
      </tr>
    </table>        
    </form>
</body>
</html>
